package com.xxx.car.service;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageInfo;
import com.xxx.car.entity.TbUserCar;
import com.xxx.car.entity.vo.request.ReqUserCar;
import com.xxx.car.entity.vo.request.ReqUserCarAdminQuery;
import com.xxx.car.entity.vo.request.ReqUserCarQuery;
import com.xxx.car.entity.vo.response.RespUserCar;
import com.xxx.car.entity.vo.response.RespUserCarAdmin;

import java.util.List;
import java.util.Map;

/**
 * Created by xuwenjie on 2017/6/14.
 */
public interface UserCarService {
    List<RespUserCar> query(ReqUserCarQuery query);

    RespUserCar getByIdAndUser(Integer carId, Integer userId);

    void deleteByIdAndUser(Integer carId, Integer userId);

    void saveOrUpdate(ReqUserCar reqUserCar);

    Page<RespUserCarAdmin> queryForAdmin(ReqUserCarAdminQuery query);

    PageInfo<TbUserCar> queryUserCarListForAdmin(ReqUserCarAdminQuery query);

    Map<Integer, Integer> statusGroupCount();

    RespUserCarAdmin getForAdmin(Integer carId);

    void audit(Integer carId, Boolean pass, String carErrMsg);

    RespUserCar getUserDefaultCar(Integer userId);

    void setDefaultCar(Integer userId, Integer carId);

    TbUserCar getCarByCarNo(String carNo);
}
